package org.gbis.openbus.db;

import org.gbis.openbus.Item;
import org.gbis.openbus.SearchResult;
import org.gbis.openbus.SearchRoute;

import com.sbmoon.db.QueryResult;

public class DbManagerSearchRoute extends DbManager {

	@Override
	public String getSqlFileName() {
		return "sql800_searchRoute.sql";
	}

	@Override
	public Item getItem(QueryResult qr) {
		SearchRoute searchRoute = new SearchRoute();
		searchRoute.setRouteId(qr.getString("routeId"));
		searchRoute.setRouteName(qr.getString("routeName"));
		searchRoute.setRouteType(qr.getString("routeType"));
		searchRoute.setRouteTypeCd(qr.getString("routeTypeCd"));
		searchRoute.setRouteDesc(qr.getString("routeDesc"));
		return searchRoute;
	}

	private DbManagerSearchRoute() {
	}

	public static DbManagerSearchRoute getDbManager() {
		if( true ) {
			return new DbManagerSearchRoute();
		}
		return dbManager;
	}

	private static final DbManagerSearchRoute dbManager = new DbManagerSearchRoute();

	public static void main(String[] args) throws Exception {

		SearchResult searchResult = SearchResult.getNewSearchResult();
		getDbManager().getSearchResult( true, searchResult , "%11%" );

	}

}
